package Io;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class IoDemo7 {

    public static void main(String[] args) {
        try (Reader reader = new FileReader("d:/test.txt")){
            while (true) {
                int res = reader.read();
                if (res == -1) {
                    break;
                }
                System.out.println(""+(char)res);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
